﻿using System;
using System.Windows.Forms;

namespace ThreadSafeControls {
    public class ThreadSafeDateTimePicker : ThreadSafeControl<DateTimePicker> {

        public ThreadSafeDateTimePicker(DateTimePicker dateTimePicker) : base(dateTimePicker) { }

        public DateTime MaxDate {
            get { return ReturnAsync(c => c.MaxDate); }
            set { UpdateAsync(c => c.MaxDate = value); }
        }

        public DateTime MinDate {
            get { return ReturnAsync(c => c.MinDate); }
            set { UpdateAsync(c => c.MinDate = value); }
        }

        public DateTime Value {
            get { return ReturnAsync(c => c.Value); }
            set { UpdateAsync(c => c.Value = value); }
        }

    }
}
